package com.ala4.oxcafe.boot.dto;

import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.security.core.userdetails.UserDetails;

import java.io.Serializable;

/**
 * @author PING
 * @version 1.0
 * @date 2024/12/25 9:44
 */
@Data
@Accessors(chain = true)
public class TokenDTO implements Serializable {

    private String access_token;

    private String token_type;

    private Long expires_in;

    private String refresh_token;

    private UserDetails userDetails;

    private Long userId;

    public TokenDTO(Long userId, String access_token, String token_type, Long expires_in, String refresh_token, UserDetails userDetails) {
        this.userId = userId;
        this.access_token = access_token;
        this.token_type = token_type;
        this.expires_in = expires_in;
        this.refresh_token = refresh_token;
        this.userDetails = userDetails;
    }
}
